@extends('admin.layout.layout')
@section('content')
<div class="row">
    <div class="col-lg-12">
        <h1 class="page-header">用户添加</h1>
    </div>
</div>


<div class="row">
    <div class="col-lg-12">
        <div class="panel panel-default">
            <div class="panel-heading">
               用户添加
            </div>
            <div class="panel-body">
                <div class="row">
                    <div class="col-lg-6 col-lg-offset-3">
                        @if(session('error'))
                            {{session('error')}}
                        @endif

                    	@if (count($errors) > 0)
						    <div class="alert alert-danger">
						        <ul>
						            @foreach ($errors->all() as $error)
						                <li>{{ $error }}</li>
						            @endforeach
						        </ul>
						    </div>
						@endif
                        <form role="form" action="{{url('admin/user/insert')}}" method="post" enctype="multipart/form-data">
                            <div class="form-group">
                                <label>用户名</label>
                                <input class="form-control" type="text" name="username" value="{{old('username')}}">   
                            </div>
							<div class="form-group">
                                <label>密码</label>
                                <input class="form-control" type="password" name="password" value="{{old('password')}}">   
                            </div>
							<div class="form-group">
                                <label>邮箱</label>
                                <input class="form-control" type="text" name="email" value="{{old('email')}}">   
                            </div>
							<div class="form-group">
                                <label>手机号</label>
                                <input class="form-control" type="text" name="tell" value="{{old('tell')}}">   
                            </div>
                            <div class="form-group">
                                <label>头像</label>
                                <input type="file" name="pic" value="{{old('pic')}}">   
                            </div>
                            <div class="form-group">
                                <label>权限</label>
                                <select name="auth">
                                    <option value="0">普通会员</option>
                                    <option value="1">黄金会员</option>
                                    <option value="2">管理员</option>
                                </select>   
                            </div>
							{{csrf_field()}}
                            <button type="submit" class="btn btn-success">提交</button>
                            <button type="reset" class="btn btn-default">重置</button>
                        </form>
                    </div>
                    <!-- /.col-lg-6 (nested) -->
                </div>
                <!-- /.row (nested) -->
            </div>
            <!-- /.panel-body -->
        </div>
        <!-- /.panel -->
    </div>
    <!-- /.col-lg-12 -->
</div>
<!-- /.row -->


@endsection